package com.service.impl;

import com.dao.RoundDAO;
import com.entity.Round;
import com.entity.Seats;
import com.service.RoundService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class RoundServiceImpl implements RoundService {

	@Qualifier("roundDAO")
	@Autowired
	private RoundDAO roundDAO;

	@Override // 继承接口的新增 返回值0(失败),1(成功)
	public int insertRound(Round round) {
		return this.roundDAO.insertRound(round);
	}

	@Override // 继承接口的更新 返回值0(失败),1(成功)
	public int updateRound(Round round) {
		return this.roundDAO.updateRound(round);
	}

	@Override // 继承接口的删除 返回值0(失败),1(成功)
	public int deleteRound(String roundid) {
		return this.roundDAO.deleteRound(roundid);
	}

	@Override // 继承接口的查询全部
	public List<Round> getAllRound() {
		return this.roundDAO.getAllRound();
	}

	@Override // 继承接口的按条件精确查询
	public List<Round> getRoundByCond(Round round) {
		return this.roundDAO.getRoundByCond(round);
	}

	@Override // 继承接口的按条件模糊查询
	public List<Round> getRoundByLike(Round round) {
		return this.roundDAO.getRoundByLike(round);
	}

	@Override // 继承接口的按主键查询 返回Entity实例
	public Round getRoundById(String roundid) {
		return this.roundDAO.getRoundById(roundid);
	}

	@Override
	public List<Seats> getrSeat(String roundid) {
		return this.roundDAO.getrSeat(roundid);
	}

}
